#pragma once

class CThreadbase
{
public:
	CThreadbase(){}
	virtual ~CThreadbase(){}

	void beginthread()
	{
		_beginthread(threadfunc, NULL, this);
	}
	
	static void __cdecl threadfunc(void* lp)
	{
		CThreadbase* p = (CThreadbase*)lp;
		p->svc();
	}

	virtual void svc() = 0;
};